package main

import (
	"fmt"
	"math/rand"
)

func main() {
	s := 0
	d := 1
	for i := 0; i < 20; i++ {
		num := rand.Intn(20) + 1
		fmt.Println(num)

		if num%2 == 0 {
			d *= num // d= d * num d= 1 * 6 6 20
		} else {
			s += num // s= s + num s= 0 + 11 11
		}
	}
	fmt.Printf("奇数求和: %d\n", s)
	fmt.Printf("偶数求积：%d\n", d)
}
